package com.ht.dao.impl;

import com.ht.dao.SysUserDAO;
import com.ht.entity.SysUserEntity;
import com.ht.mapper.SysUserMapper;
import com.ht.util.DBHelper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class SysUserDAOImpl implements SysUserDAO {
    @Override
    public SysUserEntity queryByUsername(String username) throws SQLException {
        String sql ="select * from sysuser where username = ?";
        ResultSet resultSet = DBHelper.querySQL(sql, username);
        return SysUserMapper.toEntity(resultSet);

    }

    @Override
    public int insert(SysUserEntity sysUserEntity) throws SQLException {
        return 0;
    }

    @Override
    public int update(SysUserEntity sysUserEntity) throws SQLException {
        return 0;
    }

    @Override
    public int delete(Long userid) throws SQLException {
        return 0;
    }

    @Override
    public SysUserEntity queryByUserId(Long userId) throws SQLException {
        return null;
    }

    @Override
    public int updatePassword(SysUserEntity sysUserEntity) throws SQLException {
        return 0;
    }
}
